

const HtmlWebpackPlugin = require('html-webpack-plugin')
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const CopyPlugin = require("copy-webpack-plugin");
const path = require("path")
module.exports = {
    mode: 'development',
    devtool: "source-map",
    // entry:{
    //     index:'./src/index.js'
    // },
    output: {
        filename: "./scripts/[name].[chunkhash:5].js"
    },
    
    plugins: [
        new CleanWebpackPlugin(),
        new HtmlWebpackPlugin({ template: './public/index.html' }),

        new CopyPlugin([
            { from: './public', to:"./"}
        ])
    ]
}